<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>

 <div class="main_table">
	<table id="table" class="table">
		<thead>
			<tr>
				<th width="20%">姓名</th>
				<th width="80%">地区 长度 ${fn:length(pageData.result)}</th>				
			</tr>
		</thead>
		<tbody>
		  <c:forEach var="user" items="${pageData.result}">
		   		<tr class="datatr">
					<td>${user.baseName}</td>
					<td>${user.baseUsername}</td>				
			    </tr>
		   </c:forEach>					
		</tbody>
	</table>
</div>
<div class="page">
	<ul class="cf">	
	    <li>
	    	<c:choose>
				<c:when test="${pageData.pagination.hasPrevPage}"><a href="javascript:jumpPage('${ctx}/user/listPage',${pageData.pagination.prevPage})">上一页</a></c:when>
				<c:otherwise><a href="#" style="color:red">上一页</a></c:otherwise>
		    </c:choose>
	    </li>  
	    <c:if test="${pageData.pagination.totalCount > 0}">
	    	<li><a href="javascript:jumpPage('${ctx}/user/listPage',1)">1</a></li>
	    </c:if>		
		 <c:if test="${pageData.pagination.totalPage >= 2}">
	    	<li><a href="javascript:jumpPage('${ctx}/user/listPage',2)">2</a></li>
	    </c:if>
		 <c:if test="${pageData.pagination.totalPage >= 3}">
	    	<li><a href="javascript:jumpPage('${ctx}/user/listPage',3)">3</a></li>
	    </c:if>
	     <c:if test="${pageData.pagination.totalPage >= 4}">
	    	<li><a href="javascript:jumpPage('${ctx}/user/listPage',4)">4</a></li>
	    </c:if>
		 <li>
	    	<c:choose>
				<c:when test="${pageData.pagination.hasNextPage}"><a href="javascript:jumpPage('${ctx}/user/listPage',${pageData.pagination.nextPage})">下一页</a></c:when>
				<c:otherwise><a href="#" style="color:red">下一页</a></c:otherwise>
		    </c:choose>
	    </li>  	
		<li class="together">${pageData.pagination.pageNo}/${pageData.pagination.totalPage}  共${pageData.pagination.totalCount}条数据</li>
	</ul>
</div>